home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Phreaking⁄Wardialers / Phreaking texts / PhoneCards.txt < prev    next >
Text File  |  1999-01-28  |  57KB  |  1,183 lines

  1. <BOBOàÃdHHHHHH≠àœPHàÃ4àÃ=ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø1‘ àà ù-Zåœ5ùù`=ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø^ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøzùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøÍùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø†ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø¨ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøcùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøOùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø˛ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø$ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø#AùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø*2ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø:ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø+ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøHùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø›eùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø
  2. sùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø
  3. ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøÇùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø•ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø«ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø”ùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøûùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäølùÓKàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøvú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøOú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøHú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø:ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøAú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøÛú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø¨ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø∂ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø$ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø•ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø^ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøeú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäølú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø˛ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø«ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøVú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøaú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø2ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø‚ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäø™ú∫KàÃÀåéîèàÃ4üîPàªXà∑hà∑dà¿8àsïùùùùéìÉ(B¸àäøxHHô@ù“ù”    R(∏õHH g    `∏'ù“ù”    Rùùü˝›##‹lm`/±j∂àœ`àœDàŒ0∂jüîPü¬ àœ\4Éùùùùùùùù(|DSET
  4. #\]«Òã'@àÃ(àÃ,àÃ0å‡à‘p(ƒ8å‡à‘`(ƒMå‡à‘h(ƒ ôå‡à‘Â(ƒÈå‡à‘|(ƒ–å‡à‘ƒ(ƒ¸å‡à‘Í(ƒˆå‡à‘x(ƒ#•å‡à‘,(ƒ(ìå‡à‘4(ƒ-5å‡à‘8(ƒ1`å‡à‘((ƒ5Ôå‡à‘0(ƒ:~å‡à‘(ƒ>óå‡à‘ (ƒC!å‡à‘(ƒFëå‡à‘$(ƒJ`å‡à‘—(ƒO)å‡à‘t(ƒTCå‡àœØ(ƒWŸå‡àœŸ(ƒ\Zå‡àœï(ƒ_§å‡àœœ(ƒe    å‡àà (ƒhså‡àœª(ƒl˚å‡àœÀ(ƒpå‡àœ,(ƒsºå‡àœî(ƒxBå‡àœ˝(ƒ&å‡àœ–(ƒ…7å‡àœå(ƒ·Âå‡àœˇ(ƒÂÑå‡àœ≠(ƒÎçå‡àœ√(ƒÔ    å‡àÃ\`"P«≥ôö.@GHIJˆı˙ìî$+V|fl˜8iÒÛ©Üõ8oÌáœ1|˘™ö<≈Δˇù&>TUbpÆ©Å¥    Ö    à    ü ¡ö8MbÔê        1    2    3    _    `    t    «    Û    ®    Ê    ¯
  5.     ⁄
  6. %
  7. X
  8. Y
  9. t
  10. u
  11. v
  12. Ì
  13. Ï
  14. ª
  15. õ
  16. ú
  17. ù  # @ A U b c
  18. ¥ ô I Ú ¡
  19. 6
  20. ÷
  21. ã oÊ
  22. \Ä€
  23. \®∏LST
  24. ˘Ã
  25. [¥öKıßÄ
  26. ”>Èfi.\]
  27. ∂ñFÒ§–0 G H\p—Ú®øåÀ  !"A Y Z [    f    g›íì-w° U¸»}~ªäœ4YZ∞ʯøπ ì î
  28. %
  29. =
  30. f
  31. …
  32. ’
  33. »ú  9
  34. b
  35. cˆ¡óDε€ @
  36.  x à!
  37. !H!Î!fi
  38. "
  39. "N
  40. "‹"â####U#_#`#a#ß
  41. #•$$N$O$Á$é
  42. %%]%Å
  43. %í&+&x
  44. ' '`'∞'¢'£'í ( ((1(2(:(s({(…(¸(ü(√(ì(Œ))&)Y)a)ı)£)˜)fi***;*R*Z*Ô*˘*¯*˜*fi+
  45. +!+)+M+b+w++¨
  46. ,
  47. ,=
  48. ,N
  49. ,_
  50. ,p,‹,È,≠,ˇ,ç---5 -]-˙-˘-Õ.....6 .a .b .c.w.x.›.§//'/S/p/È/˙/â/»/ó00;0]0k0Ï0Ç0ˇ0Ã0û1 1!1J1`1v1—1Δ1≥1ö22/2P2l2·2Ä2ø2é2ñ3,3I3i3≈3ˆ3µ3ã3œ44,4:4v
  51. 4ÿ
  52. 5
  53. 5/5E5M5N5O5Ô 5π6"6n6º6ó6Ø6ò777L7Ì7â7û8    8+8?8a8u8Ä8≤8ï99%9G9ƒ9¢9ª::T:Ï:¶;;A;{;∞;à;◊<<"<B<d<x<∫ <ó = =J =h =‹ =ß =ç=ö>>>'>(
  54. >]
  55. >c>Â>µ>fi>˛>ñ>ó
  56. ?"?J?r?ˆ?ı
  57. ?∞?ë?ö@(@)@]@|@« @Ë @¥ @Ω @â @Œ @û @ñA?
  58. A˙Aì
  59. B$
  60. B%BMBNB~ BÆ B©BáBÊB C!CIC_CgC}C±CºC˝CòD
  61. DD+DYDoD}D∞DÖDâDœDôE6
  62. Eo
  63. Efi
  64. E‘FF
  65. FFFF;
  66. Fa
  67. FbFv F… F—FëFÃF”G!G;GOGPGQG_ Gf GgGrGsGÎGºG˝HHQH‚H¨H˝IIII0 I> I?IYIwIÁI˚I¸I• I¨ IàI†I¿JJ`JƒJ≈JÓJ∑
  68. K6K≈
  69. K¨L    LY
  70. LˆL∑M-MnMoMÜNNQN˚NÀN»NÕN“N⁄O:O≈O©OÅOØPPPOPPP˚PœQ    QWQ~QQÅQôR!
  71. R`RΔ R‘S9S‡SëTTKTˆT–U    U4U5U6UBUCUDUÈUÊU¯U U¡V3VOVPV˚V£VßV⁄WWWSWYWZW∂WŸXX
  72. X)XxXÔX≥Y!Y_Y˘YœZ*ZhZæ[[9[`[…[—[Ò [∞ [¢[π\\\\\$\L\Z\h\v\Ô\£\±\ã\˛]](]0]Q]a]q]÷]Á]£]^^^"^E^h^∞^ü^¡^‘__7_M_U_V_W_X_Y_Z_Á_Ω_º_é_§``A`g`Á`ÿ`àaaa]aÒaΩa‘b;brb‹bâbçcc5cycflc™ccùd>d`dtdudvd©dπ
  73. eeheËeÍeÄe∂e•e§e»eùff?fGf|fÌfÆfÊfêf f∏gg(g0gFgxgÈgßg®g˜ gÀ gô h h"h*h+h<h=h> h…hãii<i=iYiZi[i«i…i—
  74. i†jjjjÜkkNk¸kÃll9l`lalblcldlÄl™mm7m8m9mKmLmMmÙm´mªnn—n√n’ooooC oD!oy oz!oÿ oÉ"oÕ oŒ"où"p"p"pp1p2p3#ph#pi#p˚pÀ#qqg#q˙qã#r#r_#r∞r£#r¬r¡#s)#s*#s3#s4#s5#s6s÷sΩsºttTtUtV"tq$t‹$t·tÚtÙtˆ%tèt≤&uu&uNuk&uˆuÖ&u u¡uÀu»u∏uõ'vv:&vrvÎ&vªv¡&ww=&wuwÓ&w√wŒ&x#xB&xzx{x|xËxÍ(xÉx¡yyUyÂyàyôz1zhz¸z˜{
  75. {D{{{æ{»| |W|È|â|∏}3}j}∞}ˇ~~F~}~•~Œ"#$%&BZ[)ku)Ⴣƒ*ƒ
  76. *ƒ &ƒ("ƒS+ƒ·,ƒÜ&ƒõ-≈2&≈u-≈Å&≈Ã-«"«f.«„-«ø…-…9…}…~……ƒ)…Í…ˆ…ı)… —4—≈—›—∞—¢%—Æ*—Å*—Ê*—≥/—Ã-÷ ÷@÷Í-÷ã"‹‹l"‹Ω·"·S·¢·Ã"‡9/‡p!‡ÿ0‡œ+‚)*‚O ‚Á‚≤1‚À"‰,‰w"‰™„"„E„Ì"„Â,"Âx´"ÁÁa"Á®Áô"È?ÈÈ"ÈéË)"ËnËÖ"ÍÍA#Íx2͵,Í ,Î,ÎH,Îy,ÎÅ,Χ,Ì ,ÌC,ÌuÌ•,̬,Ï,ÏG,Ïx,Ï©,ϧ,Ï,Ï“,Ó3Ó#0ÓC3ÓU'ÓW4Ó[4Ó\4Ók4Óz4Ó{"ÓÍ"ÓÎÓ±ÓçÓïÔÔ    )Ô1)Ô2ÔeÔ±ÔªÔäÔ†ÔñÔó)Ò&)Ò`)ÒÓ)Òê)Ò√)Ò’)Òë)Ò¶)Ò≠)Òã) 1‘ ‹úàÃ$úúàœ∏∏àœ Øöàœ €öàœ”ùàœÃîàœãÕàŒ∏™€àŒØ#Δ»àŒŸ'Û∏àŒï+ÏóàŒœ/‰∑àŒÀ3kŒàŒî7VôàŒ˝;PõàŒ–?MóàŒˇCDòàŒåG=ùàŒ≠K<ùàŒ√O;–àŒªSûàŒüW õàŒø[    ùàŒ∫_ôàŒΩc–àŒ•ffióàŒÉjπ àŒ®n™–àŒÆrÛ»àŒßvƒùàŒ›zŸàŒ˙~sõàŒÚ«pfiàŒÓ‹NòàŒÍ‰GúàŒÂÈE“àŒ‡Ì6àŒ—ÓL‹àŒƒú===============================================================================
  77. What you need to know about electronics telecards
  78. ===============================================================================
  79. Version 1.18 (Last revised: 08-09-1995)
  80.  
  81. (C) Stephane BAUSSON - (93,94,95)
  82.  
  83. 4, Rue de Grand
  84. F-88630 Chermisey
  85. France
  86.  
  87.  
  88.  
  89. >>> Any suggestions or comments about phonecards and smartcards are welcome <<<
  90.  
  91.  
  92. This file is archived at nic.funet.fi:/pub/doc/telecom/phonecard/chips
  93.  
  94. Thanks to the following people:
  95. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  96. Kimble
  97. XRed                   xxxxxx@etsit.upv.es
  98. Proux Jean-Philippe ## proux@idris.fr
  99. Tomi Engdahl        ## Tomi.Engdahl@hut.fi
  100. Gerrit Telkamp      ## telkamp@eis.cs.tu-bs.de
  101. Martin Schulte      ## schulte@thp.Uni-Koeln.DE
  102. Georges Zotos       ## picard@hol.ath.forthnet.gr
  103. Ales "MCA" Markarov ## xmarkarov@sun.felkcvut.cz
  104. Toni Cebrian        ## acebrian@etsit.upv.es
  105.  
  106. Document History:
  107. ~~~~~~~~~~~~~~~~
  108. V1.18 : New coutries:  Argentina, Burkina Faso, Cameroon, Croatia,
  109. Dújibouti, Gambia, Hungary, Mali, Mexico (Telmex), Morocco,
  110. French Polynesia, New Caledonia, St Maarten, Slovakia.
  111. V1.17 : Greek Serial Number added.
  112. V1.16 : German Telefonkarte Serial Number.
  113. V1.15 : New readers (Telecards+ISO7816 cards).
  114. V1.14 : New 512 bit Greek telecards + modification of Mexican cards.
  115. V1.13 : Checksums for french cards + modification for 'G+D' spanish cards.
  116. V1.12 : Chip builder code added.
  117. V1.11 : Croatian cards added.
  118. V1.10 : Romanian telecards added.
  119. V1.09 : Spanish card reading.
  120. V1.08 : Modification of the octal stage counter for greek cards.
  121. V1.07 : Modification of the 5 stage octal counter for 128 bit cards.
  122. V1.06 : Schematic of a new reader [DELETED].
  123. V1.02 : Introduction of the German cards.
  124. V1.00 : First version of the document.
  125.  
  126. Glossary of terms:
  127. ~~~~~~~~~~~~~~~~~~
  128. [TBC] : to be confirmed
  129. [TBD] : to be defined
  130.  
  131. b(i) : Bit i
  132. B(I) : Byte I
  133. x^y  : x at the power y  (in mathematical expresssions)
  134.  
  135.  
  136.  
  137. * Content *
  138. ~~~~~~~~~~~
  139.  
  140. I ) The 1st generation Telecards:
  141.  
  142. 1.1 - Introduction:
  143. 1∏.2 - SCHEMATICS of the chip:
  144. 1.3 - PINOUT of the connector:
  145. 1.4 - Main features:
  146. 1.5 - TIME DIAGRAMS:
  147. 1.6 - Memory Map for cards from FRANCE and MONACO:
  148. 1.7 - Memory Map for cards from other countries:
  149. 1.8 - Memory Map for cards from SPAIN, CROATIA and MEXICO:
  150. 1.9 - Memory Map for Mexican cards from Telmex:
  151.  
  152.  
  153. II ) The 2nd and 3rd generations Telecards:
  154.  
  155. 2.1 - Introduction:
  156. 2.2 - Pinout:
  157. 2.3 - Main features:
  158. 2.4 - Time Diagrams:
  159. 2.5 - Memory Map:
  160.  
  161. 2.5.1 - Memory Map for 5 satge octal unit counter:
  162. 2.5.2 - Memory Map for 4 satge octal unit counter:
  163. 2.5.3 - Memory Map for new 512 bit Greek telecards
  164.  
  165. 2.6 - Electrical features:
  166.  
  167.  
  168. III) Schematics of Readers:
  169.  
  170. 3.1 - Reader 1 (very simple one, only for telecards)
  171. 3.2 - Reader 2 (for telecards and ISO7816 cards too)
  172.  
  173.  
  174.  
  175.  
  176. I ) The 1st generation Telecards:
  177. ============================
  178.  
  179. 1.1 - Introduction:
  180. ~~~~~~~~~~~~
  181.  
  182. Since the middle of 80's have appeared a new generation of cards  ( the
  183. smart-cards  or  chip cards )  that have  replaced most of the magnetics cardös
  184. applications  notably  for  telecom payement and  also for credit cards. These
  185. cards are far more secure than the magnetics cards, and there are several kind
  186. of  cards following  the application.  The simplier ones are the Simple Memory
  187. cards  like the  one used as  Telecard  for the telecom payement in the public
  188. phone-booths  ( Generaly all the memory content is  readable,  and there  is a
  189. maker-area that is unwritable ) , then there are  more sofisticated  cards:
  190. Memeory Cards with some area read protected by a key, these cards can  contain
  191. some  private informations in  the read-protected area.   At the end there are
  192. microprocessor-cards (cards working following the ISO-7816 protocol), that are
  193. the safiest ones  since these cards  have their own internal  Operating System
  194. that prevent  I/O  if the PIN (Personal Idenfication Number) has not been ent-
  195. ered in the cards before ( These cards are used  when confidentiality is
  196. needed,  like in  credit cards (bank), crypted TV access cards, health cards,
  197. öSIM cards for GSM, etc ... ).
  198.  
  199.  
  200. About telecards, even if these cards are the less safe ones, don't think
  201. that  you  are  going  to  phone freely for that, in fact no.  All the data are
  202. readable since  there are  no confidential data inside, the cards are well done
  203. enough to be  very secure for  the payement of telecom communications in public
  204. booth.
  205.  
  206. So, what is a phonecard exactly ? In fact generaly it's a 256 bits EPROM
  207. ( French likde cards ),  or a 128 bits EEPROM (German like cards) with a serial
  208. output and some other control pins.
  209.  
  210. Then why can it not be refilled ?   Well,  indeed to refill the card you
  211. will  have to erase the cards with UV,  knowing that the cards is coated in  UV
  212. opaqued resin that prevent  UV from reaching the silicium chip, and even if you
  213. could  to erase the chip  you will have to program the manufactuer area that is
  214. write-protected by a lock-out fuse that was fused after the card programming in
  215. factory.
  216.  
  217. Neithertheless it can be very interesting to study how these cards work,
  218. ùto see  which kind of data are inside and  how the data are maped  inside or to
  219. see  how many units are left  inside for exemple.  Besides  there  are a  great
  220. number of  applications of  these cards when there  are used (only for personal
  221. use of course) , since  you can use them as key to open a door, or you can also
  222. use them as key to secure a program, etc ....
  223.  
  224. French Telecards have been created in 1984 and at this time constructors
  225. decided to build these cards in NMOS technology but now, they plan to change by
  226. 1994 all readers  in the public booths  and use CMOS technology. Also they plan
  227. to use  EEPROM to secure the cards and to add many usefull infornations in, and
  228. you will perhaps use phone cards to buy you bread or any thing else.
  229.  
  230. These cards are called Second Generation Telecards.
  231.  
  232.  
  233. 1.2 - SCHEMATICS of the chip:
  234. ~~~~~~~~~~~~~~~~~~~~~~
  235.  
  236. .-----------------.
  237. |>_ Clk           |
  238. | R/W             |
  239. | Reset           |
  240. | Fuse            |
  241. | Vpp             |
  242. '-,             ,-'
  243. .-'-------------'-.
  244. |    î         Out |-- serial output
  245. '-----------------'
  246.  
  247.  
  248. 1.3 - PINOUT of the connector:
  249. ~~~~~~~~~~~~~~~~~~~~~~~
  250.  
  251.  
  252. AFNOR CHIP
  253.  
  254. Afnor Position                              ISO position
  255. (in the left top corner)                     (in the middle left)
  256.  
  257. ,-------------+-------------,               ,-------------+-------------,
  258. |   8         |         4   |               |   1         |         5   |
  259. +-------\     |     /-------+               +-------\     |     /-------+
  260. |   7    +----+----+    3   |               |   2    +----+    +    6   |
  261. +--------|         |--------+               +--------|         |--------+
  262. |   6    +    +----+    2   |               |   3    +----+----+    7   |
  263. +-------/     |     \-------+               +-------/     |     \-------+
  264. |   5         |         1   |               |   4         |         8   |
  265. '-------------+-------------'               '-------------+-------------'
  266.  
  267. NB: only the position of the chip is ISO standardized and not the pinout.
  268.  
  269. PINOUT: Õ  1 : Vcc = 5V     5 : Gnd
  270. ~~~~~~    2 : R/W          6 : Vpp = 21V   (*)
  271. 3 : Clock        7 : I/O
  272. 4 : RAS          8 : Fus         (*)
  273.  
  274. (*) Not used with the new G+D cards compatible with the 256 bit memory
  275. Exemple: spannish G+D cards.
  276.  
  277.  
  278. 1.4 - Main features:
  279. ~~~~~~~~~~~~~
  280.  
  281. Synchronous protocol.
  282. N-MOS technology or CMOS for the new ones.
  283. 256x1 bit organisation.
  284. 96 written protected by a lock-out fuse.
  285. Low power 85mW in read mode.
  286. 21 V programming voltage.
  287. Access time: 500ns
  288. Operating range: -10xC +70xC
  289. Ten year data rentention.
  290.  
  291.  
  292. 1.5 - Time diagrams:
  293. ~~~~~~~~~~~~~
  294. a - Cards from Schlumberger, Solaic, Gemplus
  295. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  296.  
  297. +21V                                     _____________
  298. +5V ____________________________________|             |_________________ VPP
  299. :             :
  300. +5V                  ___________________:_____________:_________________ ___
  301. 0V  ________________|                   :             :                  RST
  302. :                   :             :
  303. +5V   €  ____        :      ____         :       ______:______
  304. 0V  ___|    |_______:_____|    |________:______|      :      |__________ CLK
  305. :    :       :     :    :        :      :      :      :
  306. +5V    :    :       :     :    :        :______:______:      :           _
  307. 0V  ___:____:_______:_____:____:________|      :      |______:__________ R/W
  308. :    :       :     :    :        :      :      :      :
  309. +5V    :    :       :_____:    :________:      :      :      :__________
  310. 0V  XXXXXXXXXXXXXXXXX_____XXXXXX________XXXXXXXXXXXXXXXXXXXXXX__________ OUT
  311. :    :       :     :    :        :<-----><---->:      :
  312. :    :       :     :    :        :10 to   10 to       :
  313. :    :       :     :    :        :50 ms   50ms        :
  314. Reset        Bit 1        Bit2                           Bit 3
  315. card        reading      reading  Bit2 writing to 1     reading
  316.  
  317.  
  318. NOTE: Vpp Idle state is 5V, thus Vpp will have to be connected to Vcc to read
  319. the card.
  320.  
  321.  
  322. b - Cards from G+D (Spanish cards labeled with the 5th byte = $30)
  323. ~~~~~~~~~~»~~~~
  324.  
  325. +5V                  ___________________________________________________ ___
  326. 0V  ________________|                                                    RST
  327.  
  328. +5V     ____               ____                 _____________
  329. 0V  ___|    |_____________|    |_______________|             |__________ CLK
  330. :    :             :    :               :             :
  331. +5V    :    :             :    :         ______:______       :           _
  332. 0V  ___:____:_____________:____:________|      :      |______:__________ R/W
  333. :    :             :    :               :      :      :
  334. +5V    :____:_____________:____:_______________:______:______:__________
  335. 0V  XXXX    X_____________X    X_______________X      :      X__________ OUT
  336. :    :             :    :               :<---->:      :
  337. :    :             :    :               : 1 ms        :
  338. :    :             :    :               :             :
  339. Reset     Bit 1              Bit 2          Bit 2         Bit 2
  340. card     reading            reading      writing to 1  ∏  reading
  341.  
  342.  
  343. 1.6 - Memory Map for cards from FRANCE, MONACO and St MAARTEN:
  344. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  345.  
  346. Byte (Bit)      Hexa
  347.  
  348. +-----+
  349. 1 (1..8)      |     | --> Checksum for bytes 2, 3, 4 (*)
  350. +-----+
  351. | $03 |
  352. | $04 | --> French telecard
  353. | $05 |     Serial Number (1st byte)
  354. + - - +
  355. | $80 | --> St Maarten
  356. +-----+
  357. 3 (17..24)    |     | --> Serial Number (2nd byte)
  358. +-----+
  359. 4 (25..32)    |     | --> Serial Number (3rd byte)
  360. +-----+
  361. 5 (33..40)    |     | --> checksum for bytes 6, 7, 8  (*)
  362. +-----+
  363. 6 (41..48)    |     | --> Serial Number (4th byte)
  364. +-----+
  365. 7 (49..56)    |     | --> Serial Number (5th byte)
  366. +-----+
  367. 8 (57..64)    |     | --> ? [TBD]
  368. | $FF | --> St Maarten
  369. +-----+
  370. 9 (65..72)    |     | --> checksum for byte 10, 11, 12 (*)
  371. +-----+
  372. 10 (73..80)   |     | --> ? [TBD]
  373. | $FF | --> St Maarten
  374. +-----+
  375. 11 (81..88)   | $10 | --> France and Monaco
  376. | $14 | --> St Maarten
  377. +-----+
  378. 12 (33..40)   | $13 | --> 120 units
  379. | $06 | --> 50 units
  380. | $05 | --> 40 units
  381. +-----+
  382. 13 (97..104)  |     ó| --> The units area: each time a unit is used
  383. .        |     |     then a bit is set to "1"; Usualy the 1st
  384. .        |     |     10 units are fused in factory for test.
  385. .        |     |
  386. .        |     |
  387. .        |     |
  388. 31 (241..248) |     |
  389. +-----+
  390. 32 (249..256) | $FF | --> $FF is set when all the units are used.
  391. +-----+
  392.  
  393. (*) checksum is calculated by the following expresion:
  394.  
  395. max                | min=32*(j-1)+9
  396. $E3 - 4 * Sum b(i)     where | max=32*j
  397. i=min               | and j is the checksum number (1, 2 or 3)
  398.  
  399. NOTE: The card number is the concatenation in a single string of the 5 bytes
  400. written in hexadecimal.
  401.  
  402.  
  403.  
  404. 1.7 - Memory Map for cards from other countries:
  405. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  406.  
  407.  
  408. Byte (Bit)     Hexa
  409.  
  410. +-----+                              96
  411. 1 (1..8)      |     |  --> Check Sum Byte = 216 - Sum b(i)
  412. +-----+                             i=9
  413. 2 (9..16)     | $83 |  --> Telecard
  414. | $80 |  --> Other Applications (See below)
  415. | $9A |  --> PIAF card [TBC]
  416. | $C0 |  --> AVANT card [T∑BC]
  417. +-----+-----+
  418. 3-4 (17..32)  | $1x | $xx |  --> Units+2
  419. | $11 | $52 |  --> Exemple for 150u
  420. + - - - - - +
  421. | $C0 | $25 |  --> 120u (Hungary)
  422. | $3D | $13 |  -->  80u (Morocco)
  423. | $DB | $B5 |  -->  40u (Morocco)
  424. +-----+-----+
  425. 5 (33..40)    | $00 |  --> Schlumberger
  426. | $10 |  --> Solaic [TBC]
  427. | $30 |  --> Gemplus [TBC] (finnish cards)
  428. | $40 |  --> Gemplus
  429. +-----+
  430. 6 (41..48)    |     |
  431. 7 (49..56)    |     |
  432. 8 (57..64)    |     |  --> Serial Number
  433. 9 (65..72)    |     |
  434. 10 (73..80)   |     |
  435. +-----+-----+
  436. 11-12(81..96) | $10 | $15 |  --> Djibouti
  437. |     | $16 |  --> French Polynesia
  438. | $11 | $1D |  --> French Cincarte [TBC]
  439. |     | $1E |  --> Sweden
  440. |     | $30 |  --> Norway
  441. |     | $31 |  --> New Caledonia
  442. |     | $32 |  --> Cameroon
  443. |     | $33 |  --> Andorra
  444. |     | $39 |  --> Luxembourg
  445. |     | $3C |  --> Ireland
  446. |     | $3D |  --> Gambia
  447. |     | $47 |  --> Portugal
  448. |     | $55 |  --> Czech Republic / Yougoslavia [TBC]
  449. |     | $5C |  --> Argentina
  450. |     | $5D |  --> Burkina Faso
  451. | Œ    | $5E |  --> Mali
  452. |     | $5F |  --> Gabon
  453. |     | $65 |  --> Finland
  454. |     | $86 |  --> Slovakia
  455. |     | $E0 |  --> Hungary
  456. |     | $E1 |  --> Cameroon (CamTel)
  457. |     | $E2 |  --> Morocco
  458. +-----+-----+
  459. 13 (97..104)  |     |  --> The units area: each time a unit
  460. .        |     |      is used, then a bit is set to "1";
  461. .        |     |
  462. .        |     |      The first two units are fused in
  463. .        |     |      factory as test.
  464. .        |     |
  465. 32 (249..256) |     |
  466. +-----+
  467.  
  468.  
  469. 1.8 - Memory Map for cards from Argentina, Spain, Croatia and Mexico:
  470. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  471. The spanish telecards are made from different manufacturers, and these cards
  472. should be read and written with a different protocol following the 5th byte
  473. of the memory (see subclause 1.6-a for the cards with the 5th byte=$90 and
  474. see the subclause 1.6-b for the cards with the 5th byte=$30).
  475.  
  476.  
  477. Byte (Bit)       Binary    Hexa
  478.  
  479. +-----------+-----+                            96
  480. 1 (1..8)  ô    |           |     | ---> Checksum byte = 216 - Sum b(i)
  481. +-----------+-----+                            i=9
  482. 2 (9..16)     | 1000 0011 | $83 | ---> Telecard
  483. +-----------+-----+
  484. 3 (17..24)    | 1111 1111 | $FF |
  485. +-----------+-----+
  486. 4 (25..32)    | 1111 1111 | $FF |
  487. +-----------+-----+
  488. 5 (33..40)    | 1001 0000 | $90 | ---> Oberthur
  489. | 1001 1110 | $9E | ---> Oberthur (Argentina)
  490. | 0011 0000 | $30 | ---> G+D
  491. | 0101 1010 | $5A | ---> Gemplus
  492. +-----------+-----+
  493. 6 (41..48)    |           |     |
  494. 7 (49..56)    |           |     | ---> Serial Number (*)
  495. 8 (57..64)    |           |     |
  496. +-----------+-----+-----------+-----+
  497. 9-10 (65..80) | 0001 0100 | $14 | 1000 1010 | $8A | --> 1000 pesetas (spain)
  498. | 0010 0101 | $25 | 0000 0100 | $04 | --> 2000 pesetas (spain)
  499. | 0010 0101 | $25 | 0000 0110 | $06 | --> 2100 pesetas (spain)
  500. | 0001 0100 | $14 | 1100 1010 | $CA | --> N$ 25.00 (Mexico)
  501. | 0000 0000 | $00 | 0000 0011 | $03 | --> 25 (Argentina)
  502. | 0000 0000 | $00 | 0000 1010 | $0A | --> 100u (Croatia)
  503. | 0010 1010 | $õ2A | 0010 0101 | $85 | --> 1000u (Croatia)
  504. +-----------+-----+-----------+-----+
  505. 11 (81..88)   | 0001 1110 | $1E |
  506. +-----------+-----+
  507. 12 (89..96)   | 0010 0010 | $22 | --> Spain
  508. | 0010 0100 | $24 | --> Mexico
  509. | 0010 0110 | $26 | --> Croatia
  510. | 0010 1000 | $28 | --> Argentina
  511. +-----------+-----+
  512. 13 (97..104)  | 1111 1111 | $FF | ---> the first 10 units are fused
  513. .         | 11xx xxxx | $xx |      in factory for testing.
  514. .         | xxxx xxxx | $xx |
  515. .         | xxxx xxxx | $xx | ---> Slow counter area
  516. .         | xxxx xxxx | $xx |
  517. .         +-----------+-----+
  518. .         | xxxx xxxx | $xx |
  519. .         | xxxx xxxx | $xx | ---> Fast counter area
  520. 32 (249..256) | xxxx xxxx | $xx |
  521. +-----------+-----+
  522.  
  523. The slow counter area:
  524.  
  525. Increment: counts units by an increment of 5 pesetas
  526. size:
  527. o [b107 ... b206] for 1000 pesetas cards
  528. o [b127 ... b166] for 2000 pesetas cards
  529. o [b107 ... b166] for 2100 pesetas cards
  530.  
  531. The Fast counter area:
  532.  
  533. Increment: counts units by an increment of
  534. o 10 pesetas for the 1000 pesetas cards
  535. o 2ó0 pesetas for the 2000 pesetas cards
  536. o 20 pesetas for the 2100 pesetas cards
  537.  
  538. size:
  539. o [b207 ... b256] for the 1000 pesetas cards
  540. o [b167 ... b256] for the 2000 pesetas cards
  541. o [b167 ... b256] for the 2100 pesetas cards
  542.  
  543. Exemple of an fast units area: (1000 pesetas cards)
  544. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  545. 00 -,
  546. 0000 0000  |
  547. 0000 0000  |-> Unused units
  548. 0000 0000  |
  549. 0000 0000 -'
  550. 0011 1110 ---> 14*10 pesetas are used
  551. 1000 1110
  552.  
  553. NB: Several units can be used, in this case only the last unit is set as
  554. used, like in the previous exemple, where some units are set to 0 but
  555. are nonetheless used.
  556.  
  557. (*) Serial Number for spanish telecards: The serial number for G+D and
  558. Gemplus telecards is directly obtained by the following formula:
  559.  
  560. Byte[6]*$10000 + Byte[7]*$100 + Byte[8]
  561.  
  562. 1.9 - Memory Map for Mexican cards from Telmex:
  563. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  564.  
  565. Byte (Bit)     Hexa
  566.  
  567. +-----+                              96
  568. 1 (1..8)      |     | ---> Check Sum Byte = 216 - Sum b(i)
  569. +-----+                            ò i=9
  570. 2 (9..16)     | $80 |
  571. +-----+
  572. 3 (17..24)    |     |
  573. 4 (25..32)    |     |     | --> Serial Number [TBC]
  574. +-----+
  575. 5 (33..40)    | $00 | --> Schlumberger
  576. | $10 | --> Solaic [TBC]
  577. | $40 | --> Gemplus
  578. +-----+
  579. 6 (41..48)    |     |
  580. 7 (49..56)    |     | --> Serial Number [TBC]
  581. 8 (57..64)    |     |
  582. +-----+-----+
  583. 9-10 (65..80) | $41 | $4C | --> 20u
  584. | $82 | $8C | --> 40u
  585. +-----+-----+
  586. 11-12(81..96) | $32 | $59 | --> Mexico
  587. +-----+-----+
  588. 13 (97..104)  |     | ---> The units area: each time a unit
  589. .        |     |      is used, then a bit is set to "1";
  590. .        |     |
  591. .        |     |      The first two units are fused in
  592. .        |     |      factory as test.
  593. .        |     |
  594. 32 (249..256) |     |
  595. +-----+
  596.  
  597.  
  598.  
  599. II ) The 2nd and 3rd generation Telecards:
  600. =====================================
  601.  
  602. 2.1 - Introduction:
  603. ~~~~~~~~~~~~
  604.  
  605. These cards are in fact 128 bit memory in NMOS technology, and the map of
  606. these cards are the following:
  607.  
  608. 64 bit EPROM written protected (manufaturer area).
  609. 40 bit EEPROM (5x8 bits).
  610. 24ù bits set to "1".
  611.  
  612.  
  613. 2.2 - Pinout:
  614. ~~~~~~
  615.  
  616. ISO 7816-2
  617.  
  618. ,-------------+-------------,
  619. |   1         |         5   |   Pinout:
  620. +-------\     |     /-------+   ~~~~~~
  621. |   2    +----+    +    6   |     1 : VCC=5V    5 : Gnd
  622. +--------|         |--------+     2 : Reset     6 : n.c.
  623. |   3    +----+----+    7   |     3 : Clock     7 : I/O
  624. +-------/     |     \-------+     4 : n.c.      8 : n.c.
  625. |   4         |         8   |
  626. '-------------+-------------'     (n.c. : not connected)
  627.  
  628.  
  629. 2.3 - Main features:
  630. ~~~~~~~~~~~~~
  631.  
  632. ISO 7816- 1/2 compatible.
  633. use a single 5V power supply.
  634. low power consuption.
  635. NMOS technology.
  636.  
  637. 2.4 - Time Diagrams:
  638. ~~~~~~~~~~~~~
  639.  
  640. Reset:
  641.  
  642. The address counter is reset to 0 when the clock line CLK is raised while
  643. the control line R is high. Note that the address counter can not be reset
  644. when it is in the range 0 to 7.
  645.  
  646. __________________
  647. _____|                  |_____________________________________________ Reset
  648. :                  :
  649. :        _____     :  _____       _____       _____       _____
  650. _____:ù_______|     |____:_|     |_____|     |_____|     |_____|     |_ Clk
  651. :       :          : :     :     :     :     :     :     :     :
  652. _____:_______:__________:_:_____:_____:_____:_____:_____:_____:_____:_
  653. _____:___n___|_____0____:_|_____1_____|_____2_____|_____3_____|___4_:_(Address)
  654. :                  :       :           :           :           :
  655. _____:                  :_______:___________:___________:___________:_
  656. _____XXXXXXXXXXXXXXXXXXXX_______|___________|___________|___________|_ Data
  657. Bit n                      Bit 0    Bit 1        Bit2       Bit3
  658.  
  659. The address counter is incremented by 1 with each rising edge of the clock
  660. signal Clk, for as long as the control line R remains low. The data held in
  661. each addressed bit is output to I/O contact each time Clk falls. It is not
  662. impossible to decrement the address counter, therefore to address an earlier
  663. bit, the address counter must be reset then incremented to require value.
  664.  
  665.  
  666. Write:
  667.  
  668. All unwritten or erased bits in the address 64-104 may be unwritten to.
  669. W–hen a memory cell is unwritten, it is set to 0. The addressed cell is
  670. unwritten to by the following sequence.
  671.  
  672. 1- R is raised while Clk is low, to disable address counter increment for one
  673. clock pulse.
  674.  
  675. 2- Clk is then raised for a minimum of 10ms to write to the address bit.
  676.  
  677. When to write operation ends, and Clk falls, the address counter is unlocked,
  678. and the content of the written cell, which is now 0, is output to I/O contact
  679. if the operation is correct.
  680. The next Clk pulse will increment the address by one, then the write sequence
  681. can be repeated to write the next bit.
  682.  
  683. _____                                _____
  684. _____________|     |______________________________|     |_______________  Reset
  685. :                                    :
  686. ___     :           _____           ___      :           _____
  687. ____|   |____:__________|     |_________|   |_____:__________|     |____  Clk
  688. :        :          :     :         :   :     :          :     :
  689. ____:________:__________:_____:_________û:___:_____:__________:_____:_____
  690. n  |      n+1          |     n+2       |   :    n+3         |     :  (Address)
  691. '--------:----------'-----:---------'---:-----:----------'-----:-----
  692. :          :     :             :     :          :     :
  693. _________   _:          :     : ____________:  ___:          :     :
  694. _________XXX_XXXXXXXXXXXXXXXXXXX____________ XX___XXXXXXXXXXXXXXXXXXXXXXX  I/O
  695. n      n+1           :     :     n+1        n+2           :     :
  696. :     :                              :     :
  697. write                                write
  698.  
  699.  
  700. WriteCarry:
  701.  
  702.  
  703. A counter is erased by performing the WRITECARRY sequence on the stage of
  704. the next highest weighing to that to be erased.
  705.  
  706. The writecarry sequence is as follows:
  707.  
  708. 1 - Set the address counter to an unwritten bit in the next highest counter
  709. stage to that to be erased.
  710.  
  711. 2 - Increment is disabled on the following rising edge of R where Clk remains
  712. low.
  713.  
  714. 3 - Clk is then raised for a minimum of 10ms, while R is low, to write to the
  715. next address bit.
  716.  
  717. 4 - R iõs the raised again while Clk remains low to disable increment a second
  718. time.
  719.  
  720. 5 - Clk is the raised for a minimum of 1ms, while R is low, to write to the
  721. addressed bit a second time, erasing the counter level immediately below that
  722. the addressed bit.
  723.  
  724. _____                      _____
  725. ______|     |____________________|     |_________________________________  Rst
  726. :                          :
  727. :            _______       :              _______        ___
  728. ______:___________|       |______:_____________|       |______|   |______  Clk
  729. :           :       :      :             :       :      :   :
  730. :           :       :      :             :       :      :   :
  731. <------------------------- address n ------------------------>:<--- n+1 ------
  732. :           :       :      :             :       :          :
  733. :           :       :      :             :       :          :
  734. ______:           :       :______:             :       :__________: _____
  735. ______XXXXXXXXXXXXXXXXXXXXX______XXXXXXXXXXXXXXXXXXXXXXX__________XX_____  I/O
  736. :       ù:  n                 :       :     n        n+1
  737. :       :                    :       :
  738. Write                        Erase
  739.  
  740. 2.5 - Memory Map:
  741. ~~~~~~~~~~
  742.  
  743. 2.5.1 - Memory Map for 5 stage octal unit counter:
  744. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  745.  
  746. Byte (Bit)     Hexa
  747.  
  748. +-----+-----+
  749. 1-2 (1..16)   | $F2 | $2F | --> Germany
  750. | $F4 | $2F |
  751. | $80 | $6F |
  752. + - - + - - +
  753. | $80 | $37 | --> Neitherlands
  754. | $80 | $77 |
  755. + - - + - - +
  756. | $10 | $2B | --> Romania [TBC]
  757. +-----+-----+
  758. 3 (17..24)    | $FF | --> Germany, Netherlands
  759. | $2F | --> Romania [TBC]
  760. +-----+
  761. 4 (25..32)    | $2A | --> Solaic
  762. | $4A | --> ODS
  763. | $8A | --> G+D
  764. | $CA | --> Gemplus
  765. +-----+
  766. 5 (33..40)    |     |
  767. 6 (41..48)    |     | --> Issuer area (written protected)
  768. 7 (49..56)    |     |      (See below)
  769. 8 (57..64)    |     |
  770. +-----+
  771. 9 (65..72)    |     | --> c4096  )
  772. 10 (73..80)   |     | -->  c512  )
  773. 11 (81..88)   |     | -->   c64  ) 5 stage octal counter
  774. 12 (89..96)   |     | -->    c8  )
  775. 13 (97..104   |     | -->    c0  )
  776. +-----+
  777. 14 (105..112) | $FF |
  778. 15 ô(113..120) | $FF | --> area of bits set to "1"
  779. 16 (120..128) | $FF |
  780. +-----+
  781.  
  782.  
  783.  
  784.  
  785.  
  786. 2.5.2 - Memory Map for 4 satge octal unit counter:
  787. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  788.  
  789. Byte (Bit)        Binary    Hexa
  790.  
  791. +-----------+-----+-----------+-----+
  792. 1-2 (1..16)   | 1001 0010 | $92 | 0011 1011 | $3B | ---> Greece
  793. | 1001 0100 | $94 | 0011 1011 | $3B |
  794. +-----------+-----+-----------+-----+
  795. 3 (17..24)    | 1111 1111 | $FF |
  796. +-----------+-----+
  797. 4 (25..32)    | 0111 1011 | $7B | ---> [TBC] (100 Units identifier?)
  798. +-----------+-----+
  799. |           |     | ---> Serial Number = B(8)*2^24 + B(7)*2^16 +
  800. |           |     |                      B(6)*2^8 + B(5)
  801. 5 (33..40)    |           |     |
  802. 6 (41..48)    |           |     |                  i=8
  803. 7 (49..56)    |           |     |      with B(I) = Sum {b((I-1)*8+j)}^(8-i)
  804. 8 (57..64)    |           |     |                  i=1
  805. |           |     |
  806. |           |     |      (Bytes reversed: MSB left, LSB right)
  807. +-----------+-----+
  808. 9 (65..72)    |           |     | ---> c5–12 )
  809. 10 (73..80)   |           |     | --->  c64 )
  810. 11 (81..88)   |           |     | --->   c8 ) 4 stage octal counter
  811. 12 (89..96)   |           |     | --->   c0 )
  812. +-----------+-----+
  813. 13 (97..104)  | 1111 1111 | $FF |
  814. 14 (105..112) | 1111 1111 | $FF |
  815. 15 (113..120) | 1111 1111 | $FF | ---> area of bits set to "1"
  816. 16 (120..128) | 1111 1111 | $FF |
  817. +-----------+-----+
  818.  
  819.  
  820. 2.5.3 - Memory Map for new 512 bit Greek telecards
  821. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  822. For a little time have appeared new Greek telecards built by Gemplus,
  823. these cards are 512 bit memory. And it is not clearly explained how the unit
  824. area works (Informations are welcome).
  825.  
  826. Byte (Bit)      Hexa
  827.  
  828. +-----+-----+
  829. 1-2 (1..16)   | $93 | $AB | --> Greece
  830. +-----+-----+
  831. 3 (17..24)    | $FF |
  832. +-----+
  833. 4 (25..32)    | $7B | --> [TBC] (100 Units Identifier?)
  834. +-----+
  835. 5 (33..40)    |     | --> Serial Number (See before)
  836. 6 (41..48)    |     |
  837. 7 (49..56)    |     |
  838. 8 (57..64)    |     |
  839. +-----+
  840. 9 (65..72)    | $00 | --ó> [TBC]
  841. 10 (73..80)   | $00 |
  842. 11 (81..88)   | $00 |
  843. 12 (89..96)   | $00 |
  844. +-----+
  845. 13 (97..104)  | $FF |
  846. 14 (105..112) | $FF | --> area of bits set to "1"
  847. 15 (113..120) | $FF |
  848. 16 (120..128) | $FF |
  849. +-----+
  850. 17 (129..136) | $xx | --> Unit area [TBD]
  851. .         |     |
  852. .         |     |
  853. .         |     |
  854. 64 (137..512) | $xx |
  855. +-----+
  856.  
  857. The Issuer area:
  858.  
  859.  
  860. This issuer consists of 40 bits. The contents of the issuer area are
  861. specified by the card issuer, and are fixed during the manufacturing process.
  862. The contents of the issuer area will include data such as serial numbers,
  863. dates, and distribution centers.
  864.  
  865. This area may only be read.
  866.  
  867.  
  868. Serial Number for german telefonkarte:
  869.  
  870.  
  871. Byte 4         Byte 5          Byte 6          Byte 7          Byte 8
  872. ,------,------, ,------,------, ,------,------, ,------,------, ,------,------,
  873. | <--- | 1010 | | <--- | <--- | | <--- | <--- | | <--- | <--- | | <--- | <--- |
  874. '------'------' '------'------' '------'------' '------'------' '------'------'
  875. |                       |         |     |         |      |        |      |
  876. |                       |        |     |         |      |        |      |
  877. 1st S.N.                2nd S.N.    |  9th S.N.     |   7th S.N.    |   5th S.N.
  878. digit                   digit      |   digit       |    digit      |    digit
  879. |               |               |
  880. 4th S.N.        8th S.N.         6th S.N.
  881. digit           digit            digit
  882.  
  883.  
  884.  
  885.  
  886. NOTE 1: '<---' means that the digit is written in reverse binary
  887. (MSB right, LSB left)
  888. NOTE 2: The Serial Number is the one printed on the back of the card.
  889. The last two digit are not coded in the memory [TBC].
  890.  
  891.  
  892. The Counter area:
  893.  
  894.  
  895. The counter area stores the card's units. Its initial value is specified by
  896. the card issuer and set during manufacturing.
  897.  
  898. The counter area  is divided into a 5 stage abacus counter,  or 4 stage abacus
  899. counter. The octal value of each stage is defined by the number of bits set to '1' and this stage value must
  900. be weighted by the coeficient 8^n ( where n is among [4–..0] or [3..0]).
  901.  
  902. Exemple: For a 5 stage octal unit counter with 15818 units left.
  903.  
  904.  
  905. Byte9      Byte10     Byte11     Byte12     Byte13
  906.  
  907. 00000111 - 00111111 - 01111111 - 00000001 - 00000011
  908.  
  909. (3)octal   (6)octal   (7)octal   (1)octal   (2)octal
  910.  
  911. Value = 3*8^4   +  6*8^3   +  7*8^2   +  1*8^1   +  2*8^0
  912.  
  913. TOTAL = 15818 Units
  914.  
  915.  
  916.  
  917. Exemple of the WRITE and WRITECARRY sequences:
  918.  
  919.  
  920. b65 ........................................... b104
  921.  
  922. 00000111 - 00111111 - 01111111 - 00000000 - 00000011
  923. 1                                                        ^    WRITE(b103)
  924. 00000111 - 00111111 - 01111111 - 00000000 - 00000001
  925. 1                                                         ^   WRITE(b104)
  926. 00000111 - 00111111 - 01111111 - 00000000 - 00000000
  927. 1                             ^         ^          ^
  928. 00000111 - 00111111 - 00111111 - 11111111 - 00000000 + WRITECARRY(b82)
  929. 00000111 - 00111111 - 00111111 - 01111111 - 11111111 + WRITECARRY(b89)
  930. 00000111 - 00111111 - 00111111 - 01111111 - 01111111 + W»RITE(b97)
  931. 1
  932. 00000111 - 00111111 - 00111111 - 01111111 - 00111111 + WRITE(b98)
  933. 1
  934. 00000111 - 00111111 - 00111111 - 01111111 - 00011111 + WRITE(b99)
  935.  
  936. Etc ....
  937.  
  938.  
  939.  
  940. Note that you can only decrease the counter and it is not authorised  to write
  941. in the counter a value greater than the old value.
  942.  
  943. NB: In fact most of the card units don not represent telecom units,  but money
  944. units, for exmeple in german cards each telecom unit represent 30 pfennigs.
  945.  
  946.  
  947. 2.6 - Electrical features:
  948. ~~~~~~~~~~~~~~~~~~~~
  949.  
  950. Maximum ratings:
  951.  
  952.  
  953. | Symbol   Min    Max  Unit
  954. +---------------------------
  955. Supply voltage      | Vcc     -0.3     6     V
  956. +---------------------------
  957. Input voltage       | Vss     -0.3     6     V
  958. +---------------------------
  959. Storage temperature | Tstg     -20   +55    xC
  960. +---------------------------
  961. Power dissipassion  | Pd        -     50    mW
  962.  
  963.  
  964.  
  965. DC caracteristics:
  966.  
  967. | Symbol  Min. Typ. Max. Unit
  968. +-----------------------------
  969. Suplly current            | Icc      -    -     5    mA
  970. +-------------ù----------------
  971. Input Voltage (low)       |  Vl      0    -   0.8    V
  972. +-----------------------------
  973. Input voltage (high)      |  Vh     3.5   -   Vcc    V
  974. +-----------------------------
  975. Input current R           |  Ih      -    -   100    uA
  976. +-----------------------------
  977. Input current Clk         |  Il      -    -   100    uA
  978. +-----------------------------
  979. Output current (Vol=0.5V) |  Iol     -    -    10    uA
  980. +-----------------------------
  981. Output current (Voh=5V)   |  Ioh     -    -   0.5    mA
  982.  
  983.  
  984. AC caracteristics:
  985.  
  986. | Symbol | Min. | Max. | Unit |
  987. +----------------------+--------+------+------+------+
  988. | Pulse duration       |    tr  |   50 |   -  |  us  |
  989. | R address reset      |        |      |      |      |
  990. +----------------------+--------+------+------+------+
  991. | Pulse duration       |    ts  |   10 |   -  |  us  |
  992. | R write              |        |      |      |      |
  993. +----------------------+--------+------+------+------+
  994. | High level Clk       |    th  |    8 |   -  |  us  |
  995. +----------------------Ÿ+--------+------+------+------+
  996. | Low level Clk        |    tl  |   12 |   -  |  us  |
  997. +----------------------+--------+------+------+------+
  998. | Write window         | Twrite |   10 |   -  |  ms  |
  999. +----------------------+--------+------+------+------+
  1000. | Erase window         | Terase |   10 |   -  |  ms  |
  1001. +----------------------+--------+------+------+------+
  1002. |                      |   tv1  |    5 |   -  |  us  |
  1003. +----------------------+--------+------+------+------+
  1004. |                      |   tv2  |  3.5 |   -  |  us  |
  1005. +----------------------+--------+------+------+------+
  1006. |                      |   tv3  |  3.5 |   -  |  us  |
  1007. +----------------------+--------+------+------+------+
  1008. |                      |   tv4  |  3.5 |   -  |  us  |
  1009. +----------------------+--------+------+------+------+
  1010. |                      |   tv5  |  3.5 |   -  |  us  |
  1011. +----------------------+--------+------+------+------+
  1012. |                      |   tv6  |    5 |   -  |  us  |
  1013. +----------------------+--------+------+-----õ-+------+
  1014. |                      |   tv7  |    5 |   -  |  us  |
  1015. +----------------------+--------+------+------+------+
  1016. |                      |   tv8  |   10 |   -  |  us  |
  1017.  
  1018.  
  1019.  
  1020.  
  1021. III) Schematics of Readers:
  1022. =======================
  1023.  
  1024. 3.1 - Reader 1:
  1025. ~~~~~~~~~
  1026. The following schematics is a very simple one, which will enable you to
  1027. read all kind of telecards with a chip, and also other memory cards.
  1028.  
  1029.  
  1030. | +5V
  1031. |
  1032. Centronic                 /
  1033. Port                  ,/           C 100nF
  1034. Presence of *---------------||--------------------,
  1035. the card   |     ,-------------+-------------,   |
  1036. Pin10 (Ack)  --<--------*-----|   1         |         5   |---*--,
  1037. R/W | RST       +-------\     |     /-------+      |
  1038. Pin4 (d2)    -->--------------|   2    +----+    +    6   |      |
  1039. Clock           +--------|         |--------+      |
  1040. Pin3 (d1)    -->--------------|   3    +----+----+    7   |---,  |
  1041. RAZ | RFU       +-------/     |     \-------+   |  |
  1042. Pin2 (d0)     -->--------------|   4         |         8   |   |  |
  1043. '---------fi----+-------------'   |  |
  1044. I/O                                             |  |
  1045. Pin 11 (Busy) --<----------------------------------------------'  |
  1046. Gnd                                                |
  1047. Pin 25        ----------------------------------------------------'
  1048.  
  1049.  
  1050.  
  1051. 3.2 - Reader 2:
  1052. ~~~~~~~~~
  1053.  
  1054. This Reader which is indeed a reader/writter will enable you to read/write
  1055. most of the more current memory cards (and notably telecards), and also smart
  1056. cards working under ISO7816 protocol (Credit cards, SIM cards, Health cards,
  1057. Videocrypt TV cards, etc ...).
  1058.  
  1059.  
  1060. +5V o
  1061. |
  1062. *-----------------,
  1063. |                 |
  1064. ,-------------,          |
  1065. +  |     Vcc     |  +       |
  1066. SUBD25         ,--|C1+       C2+|--,       |       K
  1067. RS 232    1fF === |             | === 1fF  |        /                 Smartcard
  1068. '--|C1-   M   C2-|--'       |       /                  Connector
  1069. RX             |      A      |          '-----o'   o----*---------------o 1
  1070. 3 o---------------|TX1   X   In2|----------------ò*---------|---------------o 7
  1071. TX             |             |                | ,-------|---------------o 4
  1072. 2 o----------,   -|TX2   2   In1|-   1/3 7406    | | ,-----|---------------o 2
  1073. Gnd       |    |      3      |  ,---,  ,---,  | | | ,---|---------------o 8
  1074. 7 o-,        '----|RX1   2  Out1|--| 1 |o-| 1 |o-* | | | ,-|---------------o 3
  1075. |             |             |  '---'  '---'  | | | | | *---|>|-*-------o 6
  1076. """           -|RX2      Out2|-               | | | | | | ,-|>|-'   ,---o 5
  1077. |             |                | | | | | | | 2xD     |
  1078. +5V   + |             |    +           | | | | | *-|----||---*
  1079. o-||--|CV+  Gnd  CV-|--||-,          | | | | | | |   100nF |
  1080. 1fF  '-------------' 1fF |          | | | | | | |        """
  1081. |            |          | | | | | | |
  1082. SUBD 25               """          """         | | | | | | |c
  1083. PRINTER Port                                     | | | | | |  \ | PNP
  1084. | | | | | |   >|---,
  1085. D0 - (4) RFU (RAZ)                            | | | | | |  / |  ,-,
  1086. 2 o------------------------ú----------------------|-' | | | | |e    | | 10k
  1087. D1 - (3) CLK       ,---,   ,---, 1/3 7406     |   | | | | |     | |
  1088. 3 o-------------------| 1 |o--| 1 |o-------------|---|-|-* | |     '-'
  1089. D2 - (2) RST (W)   '---'   '---'              |   | | | | |      |
  1090. 4 o----------------------------------------------|---' | | | |     c \ | NPN
  1091. D3 - (8) RFU (FUS)                            |     | | | |        >|----,
  1092. 5 o----------------------------------------------|-----' | | |     e / |   ,-,
  1093. D4 - (7) I/O                ,---, 1/6 7406    |       | | |      |      | |
  1094. 6 o----------------------------| 1 |o--*---------'       | | |     """     | |
  1095. D5 (Desativate Oscillator)  '---'   |    2xD   ,---,  | | |         10k '-'
  1096. 7 o------------------------------------|----|<|-*-| 1 |o-' | |              |
  1097. D6 (Vpp Command)                    |  ,-|<|-' '---'    | |              |
  1098. 8 o------------------------------------|--|----------------|-|--------------'
  1099. D7                                  |  |                *-|--------,
  1100. 9 o---“---x                             |  |                | |  ,-----'------,
  1101. ACK (Presence of the card)          |  '----------------|-|--|Oscillator F|
  1102. 10o------------------------------------|-------------------' |  '------------'
  1103. BUSY (Synchronous Data Output)      |                     |        |
  1104. 11o------------------------------------'                     |       """
  1105. GND                                                       |    F=3.6864MHz
  1106. 25o-----,                                                    |
  1107. |       100uH            1N4935                      |
  1108. """    ,-@@@@@--*-----------|>|--------*----*---------* +21V
  1109. |        |                      |    |         |
  1110. |        '---||  BUZ11 or       |    |         |
  1111. |        ,->-||    IRF14        |    |         |
  1112. |        |---|'--,             ,-,   | 1nF     |
  1113. |        |       |         330k| |  ===        |
  1114. |       """      |             | |   |         |
  1115. |                |6            '-'   |         |
  1116. |       ,------------------,    |    |        +| 220fF
  1117. |      5| Vcut   Ext   Vfb |7   |    |        ===
  1118. +12V >--------*-------|      MAX 643     |----*----'         |
  1119. |       | LB1   GND   COMP |    |              |
  1120. |       '------------------'   ,-,             |
  1121. |   +      |1    |3    |8      | |22k          |
  1122. *----||----*-----*-----'       '-'             |
  1123. |   10fF         |              |              |
  1124. |               """            """            """
  1125. |
  1126. |       ,---------,
  1127. '----*--|   7805  |--*----> +5V
  1128. |  '---------'  |
  1129. 100nF ===      |      === 100nF
  1130. '-------*‹-------'
  1131. |
  1132. """
  1133.  
  1134. Component List
  1135. ~~~~~~~~~~~~~~
  1136.  
  1137. Integratyed Circuits
  1138.  
  1139. 1xMAX232 (RS232<-->TTL Adapter)
  1140. 1xMAX643 (12-->21V Converter Controler)
  1141. 1x74LS06 (6 inverters)
  1142. 1x7805   (5V regulator)
  1143.  
  1144. Transistors                      Diodes
  1145.  
  1146. 1xBUZ11 or IRF14                 4x1N4148 or other
  1147. 1xBC107 or antoher NPN           1x1N4935 or another fast commutation diode
  1148. 1xBC177 or another PNP
  1149.  
  1150.  
  1151. Condensators        Resistors          Misc
  1152.  
  1153. 3x100nF              2x10k          100uH self
  1154. 1x1nF                1x330k         1xSmartcard connector
  1155. 1x10fF               1x22k          1xSUBD25 Female
  1156. 1x220fF                             1xSUBD25 Male
  1157. 4x1fF
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163. DSET|ùù(HøùùùùùùàœTå‡é
  1164. ‡åàùù6ùù*éDSET|ùù(HùùùùùùàœLé‡åª˙6ùù*˛ïéFNTM˙ùùH    HelveticaMonacoCUTSDSUM&
  1165. Performa UserHDNIETBL8FNTMˇ.CUTSˇ≥DSUMˇéHDNIçETBLçùúõ∏öôòØï“⁄€Ÿûñó